package org.zjx.analysis.analyze.login;


import org.zjx.analysis.analyze.AbstractImageAnalyzer;
import org.zjx.command.util.ImageUtil;

import java.awt.*;
import java.awt.image.BufferedImage;

public class LoginToggleAnalysis extends AbstractImageAnalyzer {

    public LoginToggleAnalysis() {
        super("登录-切换", "登录");
    }

    @Override
    protected void initResources() {
        imageMap.put("普通登录",new AbstractImageAnalyzer.ResolutionImage(ImageUtil.createRect(244, 185, 363, 223),ImageUtil.createImage("iVBORw0KGgoAAAANSUhEUgAAAHgAAAAnCAYAAADEvIzwAAAG1ElEQVR4Xu2bzW9UVRiHz99i4gKJEEGQGCIhGEig2laBltoynVJa7AeNFTASU6ygpA0lMWFNNCxcuHJhdGni2r3/jc5zZn7jO+/9mHun09sid/HrdM7c+55z3ue8HzOdhqtX7oSimp6+H+ZvPgxLq9tRt9d29kVLq6+YbrfVmHsYJq7dD+Mf3SmsxECWbix8FydbXf8+LLecXKt64XsYwMLzyVJiIE0YZILFlZ1wfmQtHD0xHl5/43ytCoXP8T0MYFEUcmLAqzn/MBqcXXgcjhwfbelyePt0I5w5N1urQuFzfA8DWMAENp6XV2KAHE+uX1jajoqRu7TVhfvOe81w7NS1tk7UqkQdf+N7Qb61/CSy6Vefe56k1dmYli/djoZrqAdALQawgInSdV597oGbVWcx+NbJieRktfZFsIBJkfocf+TV2XfPzoaTp2cTk9TaX8EENv3qc7g6+eVgdVav16pG3v+OQ1p9hm24Pvt1+TrrJ69VjTwHr1O99Rm2oXnzcVhaeRLJF6qzftJa1crzcGrX59HIFLaRNCFNsc414CfK0YXR9XB388dWfZjvGR+f/CK+5q/fb7GmxTtPE+OIPRzENSf4GMESprANi8tboXlrO7x26FziwoTRgnrw7Nfww+9//8OjxnASYwjQ/p4yGmtuhue//BXt8bj1/Lconm+/+CMsru8k7smT7uUR2xpnndhH/p4iYs/4gDVhe+Ppz/HgI8a17rLrTchxgyVMYdsO5VbnlQDsjRSQIuHety+6zsZhiE0JMBvlOh/hXtyHI6zTkbW189Of0Uk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Zj3LTXsuav7Ba7GAIS5jCNkxd34h/Wjp7YSEcOnJxKFF8ELRrZ+2R+qX3gdXhBkNYwhS24ePLd+Mfhxs3HoXDRy/8B9kbqHWw1YELQ1jCFLbxq5VTMxsxpCc+udeFPIx0XasCddKy4MIQljAdHfusDXjkg9Uw3XgQZucfhem5zXDm/Wa8WF+srqP6gKkTrTTGCFYwg11k2GIJU9T9BjxPJme+ihcQ4o0bG10NqwGrNQSZRsoyghnsYCi4PYAFeXR8LUxe+zxMNdo3cfP/rQF7aeUaKYGF1ZWJu5Gdhdvzv0kWsjQ6ttJN23UDdgBkGimlYxhdvLTUFXUX9fxvUpoEeWrmfjRUN2D7qJRGCiawsQFpI7cvYAs6rQFTga9VjfIaKQ+1FGBBzmrAalWp9EbK8yoNGMWabBqwmblvXkm1D3j1ymuk8vQvlWD54az2c6kAAAAASUVORK5CYII=")));
    }

    @Override
    protected boolean isSceneMatch(BufferedImage image) {
        ResolutionImage resolutionImage = imageMap.get("普通登录");
        return ImageUtil.haveImage(image,resolutionImage.getRectangle(),resolutionImage.getPattern());
    }

    @Override
    public void analyze(BufferedImage image) {

    }

    public Rectangle getNormalLoginRectangle() {
        return imageMap.get("普通登录").getRectangle();
    }
}
